export const imgerr = {

  inserted(el, binding) {
    // 数据不存在
    el.src = el.src || binding.value

    // console.log(el, binding.value)

    // 数据存在，地址报错
    el.onerror = function() {
      el.src = binding.value
    }
  },
  componentUpdated(el, binding) {
    el.src = el.src ? el.src : binding.value
  }
}
